package com.training.content.service.impl;

import java.util.List;
import com.training.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.training.content.mapper.AssessInfoMapper;
import com.training.content.domain.AssessInfo;
import com.training.content.service.IAssessInfoService;

/**
 * 考核信息Service业务层处理
 * 
 * @author training
 * @date 2021-10-25
 */
@Service
public class AssessInfoServiceImpl implements IAssessInfoService 
{
    @Autowired
    private AssessInfoMapper assessInfoMapper;

    /**
     * 查询考核信息
     * 
     * @param assessId 考核信息主键
     * @return 考核信息
     */
    @Override
    public AssessInfo selectAssessInfoByAssessId(Long assessId)
    {
        return assessInfoMapper.selectAssessInfoByAssessId(assessId);
    }

    /**
     * 查询考核信息列表
     * 
     * @param assessInfo 考核信息
     * @return 考核信息
     */
    @Override
    public List<AssessInfo> selectAssessInfoList(AssessInfo assessInfo)
    {
        return assessInfoMapper.selectAssessInfoList(assessInfo);
    }

    /**
     * 新增考核信息
     * 
     * @param assessInfo 考核信息
     * @return 结果
     */
    @Override
    public int insertAssessInfo(AssessInfo assessInfo)
    {
        assessInfo.setCreateTime(DateUtils.getNowDate());
        return assessInfoMapper.insertAssessInfo(assessInfo);
    }

    /**
     * 修改考核信息
     * 
     * @param assessInfo 考核信息
     * @return 结果
     */
    @Override
    public int updateAssessInfo(AssessInfo assessInfo)
    {
        assessInfo.setUpdateTime(DateUtils.getNowDate());
        return assessInfoMapper.updateAssessInfo(assessInfo);
    }

    /**
     * 批量删除考核信息
     * 
     * @param assessIds 需要删除的考核信息主键
     * @return 结果
     */
    @Override
    public int deleteAssessInfoByAssessIds(Long[] assessIds)
    {
        return assessInfoMapper.deleteAssessInfoByAssessIds(assessIds);
    }

    /**
     * 删除考核信息信息
     * 
     * @param assessId 考核信息主键
     * @return 结果
     */
    @Override
    public int deleteAssessInfoByAssessId(Long assessId)
    {
        return assessInfoMapper.deleteAssessInfoByAssessId(assessId);
    }
}
